|
|
Hi Alf,
your declaration of the Up variable is correct, but to undo a
rotate Up
which is the same as
rotate Up.x*x // or <Up.x, 0, 0>
rotate Up.y*y // or <0, Up.y, 0>; in your code, Up.y=0
rotate Up.z*z // or <0, 0, Up.z>
you will have to undo these rotations in *reverse* order, i.e.
rotate -Up.z*z
rotate -Up.y*y
rotate -Up.x*x
so the mistake is in the next-to-last line: replace
rotate -Up
by
rotate -Up.z*z
rotate -Up.x*x
(rotate -Up.y*y is not required here because Up.y=0)
This will work as intended.
Sputnik
Post a reply to this message
|
|